<?php

namespace app\api\controller\company;
use app\shop\service\company\Examine as ExamineService;
use app\shop\service\company\WorkReport;
/**
 * 团队风采
 */
class Examine
{

    public function lists(ExamineService $ExamineService)
    {
        $data = input();
        return $ExamineService->staffList($data);
    }

    public function info(ExamineService $ExamineService)
    {
        $id = input('id');
        return $ExamineService->staffInfo($id);
    }

    public function report(ExamineService $ExamineService)
    {
        $data = input();
        $data['user_id'] = request()->user_id;
        return $ExamineService->reports($data);
    }

    public function save(ExamineService $ExamineService)
    {
        $data = input();
        $data['add_user'] = request()->user_id;
        return $ExamineService->staffSave($data);
    }

    public function logs(ExamineService $ExamineService)
    {
        $data = input();
        return $ExamineService->staffLogs($data);
    }

    public function is_manager(ExamineService $ExamineService)
    {
        $examine_id = input('examine_id');
        return $ExamineService->is_manager($examine_id);
    }
    public function saveLog(ExamineService $ExamineService)
    {
        $data = input();
        $data['manager'] = request()->user_id;
        return $ExamineService->saveLog($data);
    }

    public function addLog(ExamineService $ExamineService)
    {
        $data = input();
        return $ExamineService->addLog($data);
    }
    public function addReport(ExamineService $ExamineService)
    {
        $data = input();
        $data['user_id'] = request()->user_id;
        return $ExamineService->addReport($data);
    }
    public function reportInfo(ExamineService $ExamineService)
    {
        $id = input('id');
        return $ExamineService->reportInfo($id);
    }

    public function reportTpl(WorkReport $WorkReport){
        $data = input();
        return $WorkReport->tplList($data);
    }

    public function addReportTpl(WorkReport $WorkReport){
        $data = input();
        $data['add_user'] = request()->user_id;
        return $WorkReport->addTpl($data);
    }
}